projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c03d6b8
)
(Freplace_match): Use make_multibyte_string or
author
Kenichi Handa
<handa@m17n.org>
Thu, 15 Jan 2004 11:31:37 +0000
(11:31 +0000)
committer
Kenichi Handa
<handa@m17n.org>
Thu, 15 Jan 2004 11:31:37 +0000
(11:31 +0000)
make_unibyte_string according to the buffer multibyteness.
src/search.c
patch
|
blob
|
history
diff --git
a/src/search.c
b/src/search.c
index 538cb8dfa645d26f6862640a9f9997adfe8c13ec..020573b75a1e6abfb8a4318c6cd1a9826fed96c6 100644
(file)
--- a/
src/search.c
+++ b/
src/search.c
@@
-2553,8
+2553,16
@@
since only regular expressions have distinguished subexpressions. */)
}
if (really_changed)
- newtext = make_string (substed, substed_len);
+ {
+ if (buf_multibyte)
+ {
+ int nchars = multibyte_chars_in_text (substed, substed_len);
+ newtext = make_multibyte_string (substed, nchars, substed_len);
+ }
+ else
+ newtext = make_unibyte_string (substed, substed_len);
+ }
xfree (substed);
}